﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.ComponentModel;

public partial class control_RoundDiv : System.Web.UI.UserControl
{
    private ITemplate _template = null;

    [TemplateContainer(typeof(ContentContainer))]
    [PersistenceMode(PersistenceMode.InnerProperty)]
    [Browsable(false)]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
    public ITemplate ContentTemplate
    {
        get { return _template; }
        set { _template = value; }
    }

    private string _roundAreaCssClass= string.Empty;
    public string RoundAreaCssClass
    {
        get { return this._roundAreaCssClass; }
        set { this._roundAreaCssClass = value; }
    }

    private string _contentAreaCssClass = string.Empty;
    public string ContentAreaCssClass
    {
        get { return this._contentAreaCssClass; }
        set { this._contentAreaCssClass = value; }
    }

    protected void Page_Init()
    {
        if (_template != null)
        {
            ContentContainer container = new ContentContainer();
            _template.InstantiateIn(container);
            plhContent.Controls.Add(container);
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public override Control FindControl(string id)
    {
        return base.FindControl("plhContent").Controls[0].FindControl(id);
    }

}
public class ContentContainer : Control, INamingContainer
{
    internal ContentContainer() { }
}
